package com.example.check.mapper;

import com.example.check.entity.PermissionEntity;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

/**
 * Created by Tony Yao on 2017/7/15.
 */
public interface PermissionMapper {

    ArrayList<PermissionEntity> selectAllPermission()throws Exception;

    PermissionEntity selectPermissionByID(@Param("id")int id)throws Exception;

    ArrayList<PermissionEntity> selectPermissionByField(@Param("field") String field, @Param("code")String code) throws Exception;

    ArrayList<PermissionEntity> selectPermissionLikeByField(@Param("field") String field, @Param("code")String code) throws Exception;

    void deletePermissionById(int id)throws Exception;

    void insertPermission(PermissionEntity role)throws Exception;

    void editPermission(PermissionEntity role)throws Exception;
}
